Dictionary as DataMember in WCF after installing .NET 4.5 [migrated]
Posted
by
Mauricio Ulate
on Programmers
See other posts from Programmers
or by Mauricio Ulate
Published on 2012-11-14T16:37:34Z
Indexed on
2012/11/14
23:17 UTC
Read the original article
Hit count: 467
After installing .NET Framework 4.5 with Visual Studio 2012, whenever I want to obtain the reference from a WCF service, my dictionaries are changed into arrays. For example, Dictionary<int, double> is changed into ArrayOfKeyValueOfintdoubleKeyValueOfintdouble.
This happens in both Visual Studio 2012 and 2010 (both Express).
I've reviewed my configuration and the dictionary data type in the service reference configuration is System.Collection.Generic.Dictionary. Changing this doesn't make a difference.
Reverting to just using Visual Studio 2010 and .NET 4.0 is not an option.
© Programmers or respective owner